package com.shop.dao.shoppingcart;

import com.shop.pajo.ShoppingCart;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public interface ShoppingCartDao {

    int addToCart(Connection connection, ShoppingCart shoppingCart) throws SQLException;
    //通过uid和bid确定ShoppingCart
    ShoppingCart getShoppingCartById (Connection connection, int uid, String bid) throws SQLException;

    List<ShoppingCart> getShoppingCartByUid (Connection connection, int uid) throws SQLException;

    int deleteCartByBid (Connection connection, String bid) throws SQLException;
}
